#ifndef GAMEENGINE_MAPS_MAP_CELL_H
#define GAMEENGINE_MAPS_MAP_CELL_H

#include <GameEngine/Maps/maps_settings.h>

#include <GameEngine/Maps/terrain_descriptor.h>



#ifdef GAMEENGINE_NAMESPACES
namespace GameEngine {
#endif

//=================================================================================


//! A generic map cell
/*!
 *  A map cell solely contains the type of terrain it belongs to, and a connectivity
 *  flag that indicates to which neighbor cells the current cell is connected.
 */
template <class C>
class MapCell {

public:
	MapCell();
	MapCell(const MapCell& rhs);
	MapCell& operator=(const MapCell& rhs);
	virtual ~MapCell();

	TerrainDescriptor::TerrainType& terrain();
	const TerrainDescriptor::TerrainType& terrain() const;

	C& connectivity();
	const C& connectivity() const;

protected:
	//! Describe the type of terrain associated to the cell
	TerrainDescriptor::TerrainType terrain_;

	//! Describe to which cells the current cell is connected
	C connectivity_;
};

//========================================================

#ifdef GAMEENGINE_NAMESPACES
} // namespace GameEngine
#endif

#include <GameEngine/Maps/map_cell.hpp>

#endif
